package com.tencreat.mq.message;

import com.tencreat.common.config.OpenIMConfig;
import com.tencreat.common.utils.StringUtils;
import com.tencreat.common.utils.bean.ActionMessage;
import com.tencreat.domain.account.MallUser;
import com.tencreat.domain.im.ImCustomer;
import com.tencreat.domain.im.dto.OpenIMCreateGroupDTO;
import com.tencreat.domain.im.dto.OpenIMGroupInfo;
import com.tencreat.domain.im.dto.OpenIMRegisterDTO;
import com.tencreat.domain.im.vo.OpenIMResultVo;
import com.tencreat.service.account.IAccountLoginCheckService;
import com.tencreat.service.account.IMallUserService;
import com.tencreat.service.im.IImCustomerService;
import com.tencreat.service.im.OpenIMApi;
import com.tencreat.service.mall.IMallGoodsCutService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * IM登录事件 - 消息处理类
 */
@Service
@Slf4j
public class ActionMessageRegister implements IActionMessage {

    @Override
    public void dealMessage(ActionMessage message) {
        String unionId = (String) message.getData();
        if (StringUtils.isNotBlank(unionId)) {
            // 处理砍价
//            mallGoodsCutService.cutAfterReward2(unionId);
        }
    }
}
